<template>
  <div class="app-container home">
  </div>
</template>

<script>
import {getZwsInfo} from "@/api/guide";

export default {
  name: "Index",
  data() {
    return {
      // 版本号
      version: "1.0.0"
    };
  },
  created() {
    this.guide();
    this.close();
  },
  methods: {
    guide() {
      getZwsInfo().then(response => {
        console.log(response);
        if (response.code == 200) {
          let data = JSON.stringify(response.data);
          let encode = encodeURI(data);
          // 对编码的字符串转化base64
          let base64 = btoa(encode);
          let url = "https://mj.angchengls.com/#/Login?minfo=" + base64;
          window.open(url, '_blank');
        } else {
          this.$modal.msgError(response.msg);
        }
      });
    },
    close() {
      const obj = {
        path: "/guide"
      }
      this.$tab.closeOpenPage(obj);
      this.$router.go(-1);
    }
  }
};
</script>


